package net.viservice.quartz.job;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HelloJob implements Job {

	private static final Logger logger = LoggerFactory.getLogger(HelloJob.class);
	private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		logger.info("Hello!	HelloJob is executing.	执行时间" + sdf.format(new Date()) + "	JobDataMap[\"key1\"]:" + context.getJobDetail().getJobDataMap().getString("key1"));
	}
	
}
